!!! 5
%html.wrap
  %head.wrap
    %title=h yield(:title)
    =stylesheet_link_tag    "application",   media: 'all'
    =javascript_include_tag "application"
    =csrf_meta_tags
    %meta(name="viewport" content="width=device-width, initial-scale=0.4")
    %meta(name="description" content="DGIdb, The Drug Gene Interaction Database, is a research resource that can be used to search candidate genes or drugs against the known and potentially druggable genome.")
    %meta(name="keywords" content="genomics,genome,drug,gene,interactions,druggable,druggability,drugability,druggable-genome,drugable,dgidb,dgi-db,precision,medicine,precision-medicine,McDonnell,genome,institute,washington,university")
    %link{:href => image_path("favicon.png"), :rel => "shortcut icon"}/
  %body.wrap
    #wrap
      .container-fluid{ id: "content", style: "padding-bottom: 50px; margin-bottom: -80px; margin-top: -10px;"}
        .navbar.navbar-fixed-top.navbar-inverse#fixed_navbar{style: "margin-bottom: 0px"}
          .navbar-inner
            %a.brand(href="/")
              %img{:src => image_path("dgidb-header-branding_128c.png"), :class => "logo", :width => "500"}
            %ul.nav.nav-tabs.main-menu.wrap
              %li
                %ul.nav.help-menu
                  %li.divider-vertical
                  %li.dropdown
                    %a.dropdown-toggle{href: "#", data: {toggle: "dropdown"}}
                      Search
                    %ul.dropdown-menu{style: "position: absolute; top: 100%; z-index: 1000; float: left; min-width: 150px; padding: 5px 0; list-style: none; background-clip: padding-box; left: auto; right: 0;"}
                      %li
                        %a(href="/search_interactions") Search Interactions
                        %a(href="/search_categories") Search Categories
              %li
                %ul.nav.help-menu
                  %li.divider-vertical
                  %li.dropdown
                    %a.dropdown-toggle{href: "#", data: {toggle: "dropdown"}}
                      Browse
                    %ul.dropdown-menu{style: "position: absolute; top: 100%; z-index: 1000; float: left; min-width: 150px; padding: 5px 0; margin: 2px 0 0; list-style: none; background-clip: padding-box; left: auto; right: 0;"}
                      %li
                        %a(href="/druggable_gene_categories") Browse Categories
                        %a(href="/sources") Browse Sources
              %li
                %ul.nav.help-menu
                  %li.divider-vertical
                  %li.dropdown
                    %a.dropdown-toggle{href: "#", data: {toggle: "dropdown"}}
                      Information
                    %ul.dropdown-menu{style: "position: absolute; top: 100%; z-index: 1000; float: left; min-width: 150px; padding: 5px 0; margin: 2px 0 0; list-style: none; background-clip: padding-box; left: auto; right: 0;"}
                      %li
                        %a(href="/getting_started") Getting Started
                        %a(href="/api") API Documentation
                        %a(href="/faq") FAQ
                        %a(href="/news") News
                        %a(href="/contact") Contact
              %li
                %ul.nav.help-menu
                  %li.divider-vertical
                  %li.dropdown
                    %a.dropdown-toggle{href: "#", data: {toggle: "dropdown"}}
                      Downloads
                    %ul.dropdown-menu{style: "position: absolute; top: 100%; z-index: 1000; float: left; min-width: 150px; padding: 5px 0; margin: 2px 0 0; list-style: none; background-clip: padding-box; left: auto; right: 0;"}
                      %li
                        %a(href="/downloads") Data
                        %a(href="https://github.com/griffithlab/dgi-db") Source Code
        .container-fluid{style: "margin-bottom: 27px; margin-top: 27px"}
          .page-header{style: "margin-top: 0px; margin-bottom: 0px; padding: 0 0 -10 0; border: 0;"}
            =h yield(:header)
        .container-fluid
          - flash.each do |key, val|
            = content_tag :div, (content_tag :h3, val), class: "alert alert-#{key}"
      =yield
    =render partial: 'layouts/disclaimer_modal'
  #footer{style: "position: absolute; background: white; text-align: center; width: 100%; margin-top: 20px;"}
    %p.span5{style: "width: 100%; margin: 0;"}
      ="DGIdb (v#{CURRENT_VERSION.version} - sha1 #{CURRENT_VERSION.sha})"
      •
      ="Last updated #{CURRENT_VERSION.time}"

  :css
    html {
      zoom: 0.8;
    }
    .wrap{
      width:100%;
      max-height: 800px;
      min-width: 1200px;
    }
    #footer{
      min-width: 1200px;
    }
    .dropdown-menu {
      margin-top: 1em;
    }
    .main-menu {
      padding: 0;
    }
    .navbar {
      position: absolute;
      width: 100%;
      margin: 0px;
      padding: 0px;
      background-size: cover;
      min-width: 1200px;
    }
    .nav-tabs {
      border-bottom: 0;
      width: 400px;
      min-width: initial;
    }

    .nav.help-menu {
      background-color: white;
      border-radius: 5px 5px 0px 0px;
      border-color: black;
      border-style: solid;
      border-width: 0;
      width: 100px;
      text-align: center;
    }

    .nav.help-menu:hover {
      background-color: white;
      border-radius: 5px 5px 0px 0px;
      border-color: black;
      border-style: solid;
      border-width: 0;
    }

    .dropdown {
      border-radius: 5px 5px 0px 0px;
      border-color: black;
      border-style: solid;
      border-width: 0 0.5px 0 0;
    }

    .dropdown:hover {
      border-radius: 5px 5px 0px 0px;
      border-color: black;
      border-style: solid;
      border-width: 0 0.5px 0 0;
    }

    .dropdown-toggle {
      border-radius: 5px 5px 0px 0px;
      border-color: black;
      border-style: solid;
      border-width: 0 0.5px;
    }

    .dropdown-toggle:hover {
      border-radius: 5px 5px 0px 0px;
      border-color: black;
      border-style: solid;
      border-width: 0 0.5px;
    }
    .nav > li > a:focus {
      background-color: transparent;
    }
    .search-container:after {
      display: none;
    }
    #wrap:after {
      display: none;
    }
    #wrap {
      height: auto
    }

  :javascript
    $(document).ready(function(){
        $('[data-toggle="tooltip"]').tooltip();
    });

  -if(Rails.env.production?)
    :javascript
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-35524735-1']);
      _gaq.push(['_trackPageview']);

      (function() {
       var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
       ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
       var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
       })();